public class Test {
    public static boolean temp(int[] array) {
        int count = 0;
        for (int i = 0; i < array.length; i++) {
            if (array[i] % 2 != 0) {
                count++;
                if (count == 3) {
                    return true;
                }
             } else {
            count = 0;
        }
        }   return false;
    }

    public static void main(String[] args) {
        int[]array={1,2,4,4,5,3,7,2};
        System.out.println(temp(array));
    }
}